package psd.model.Prolog.Converters;

import org.eclipse.jdt.core.dom.NumberLiteral;

import psd.model.IConverter;
import psd.model.Prolog.FactGenerationToolbox;
import psd.model.Prolog.PrologConverter;


public class PrologNumberLiteralConverter extends PrologConverter implements
		IConverter<NumberLiteral> {

	public PrologNumberLiteralConverter(FactGenerationToolbox toolbox) {
		super(toolbox);
	}

	@Override
	public boolean convert(NumberLiteral node) {
		String args[] = {
				typeResolver.getTypeTerm(node),
				(new StringBuilder("'")).append(node.getToken()).append("'")
						.toString() ,this.getFilePath(node), this.getLineNumber(node)};
		createBodyFact(node, "literalT", args);
		return true;
	}

}
